package com.kanche.bigbaby.adapter;

import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

import com.kanche.bigbaby.support.base.BasePage;

import java.util.List;

/**
 * Created by Chenshao_Young on 15/5/18.
 */
public class BasePageAdapter extends BaseAdapter {

    List<BasePage> basePageList;

    public BasePageAdapter(List<BasePage> basePageList) {
        this.basePageList = basePageList;
    }

    @Override
    public int getCount() {
        return basePageList.size();
    }

    @Override
    public Object getItem(int position) {
        return basePageList.get(position);
    }

    @Override
    public long getItemId(int position) {
        return position;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        return basePageList.get(position).getContentView();
    }
}
